/*
 * @Author: Destiny
 * @Date: 2024-07-18 17:05:55
 * @LastEditTime: 2024-07-18 17:07:05
 * @Description: 
 */

#ifndef _RENDER_H
#define _RENDER_H

#include <pic_operation.h>
#include <disp_manager.h>
#include <page_manager.h>
#include "cnn_operation.h"

int PicZoom(PT_PixelDatas ptOriginPic, PT_PixelDatas ptZoomPic);


int PicMerge(int iX, int iY, PT_PixelDatas ptSmallPic, PT_PixelDatas ptBigPic);

void FlushVideoMemToDev(PT_VideoMem ptVideoMem);

int GetPixelDatasFrmFile(char *strFileName, PT_PixelDatas ptPixelDatas);


void FreePixelDatasFrmFile(PT_PixelDatas ptPixelDatas);

void InvertButton(PT_Layout ptLayout,PT_VideoMem ptPageVideoMem);
// void ReleaseButton(PT_Layout ptLayout,int iID);


// void PressButton(PT_Layout ptLayout,int iID);


int MergerStringToCenterOfRectangleInVideoMem(int iTopLeftX, int iTopLeftY, int iBotRightX, int iBotRightY, uint8_t *pucTextString, PT_VideoMem ptVideoMem);


void ClearRectangleInVideoMem(int iTopLeftX, int iTopLeftY, int iBotRightX, int iBotRightY, PT_VideoMem ptVideoMem, uint32_t dwColor);


int isPictureFileSupported(char *strFileName);

uint8_t * GetOnePageFrmTXT(PT_VideoMem ptVideoMem,PT_PageLayout ptPageLayout,uint8_t *pucCurPagePos,uint8_t *pucFileEnd,int iFontSize);
int SavePixelDataAsBmp(PT_PixelDatas ptPixelDatas);

int SetColorForPixelInVideoMem(int iX, int iY, PT_VideoMem ptVideoMem, uint32_t dwColor);

int PixelDataToCNNInputData(PT_PixelDatas ptPixelDatas,PT_InoutputData ptInputData);
int GetIcons(PT_PixelDatas ptPixelDatas,char *strFilePath,int iMaxTotalBytes,int iHeight,int iWidth,int iBpp);
#endif 

